﻿using System;
using System.Collections.Generic;

namespace MessagePack.Formatters
{
	// Token: 0x02000012 RID: 18
	public class QeueueFormatter<T> : CollectionFormatterBase<T, Queue<T>, Queue<T>.Enumerator, Queue<T>>
	{
		// Token: 0x06000037 RID: 55 RVA: 0x00002BC5 File Offset: 0x00000FC5
		protected override int? GetCount(Queue<T> sequence)
		{
			return new int?(sequence.Count);
		}

		// Token: 0x06000038 RID: 56 RVA: 0x00002BD2 File Offset: 0x00000FD2
		protected override void Add(Queue<T> collection, int index, T value)
		{
			collection.Enqueue(value);
		}

		// Token: 0x06000039 RID: 57 RVA: 0x00002BDB File Offset: 0x00000FDB
		protected override Queue<T> Create(int count)
		{
			return new Queue<T>(count);
		}

		// Token: 0x0600003A RID: 58 RVA: 0x00002BE3 File Offset: 0x00000FE3
		protected override Queue<T>.Enumerator GetSourceEnumerator(Queue<T> source)
		{
			return source.GetEnumerator();
		}

		// Token: 0x0600003B RID: 59 RVA: 0x00002BEB File Offset: 0x00000FEB
		protected override Queue<T> Complete(Queue<T> intermediateCollection)
		{
			return intermediateCollection;
		}
	}
}
